home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Miscellaneous Disk Images / ProDOS Basic Examples / HELPSCREENS.txt < prev    next >
Encoding:
Text File  |  1983-10-01  |  14.2 KB  |  705 lines

  1. APPEND      (Deferred)
  2.  
  3.  Prepare to print at the end of a file
  4.  
  5. Form: APPEND pn [,Ttype] [,L#] [,S#]
  6.              [,D#]
  7.  
  8. Example: APPEND /PROFILE/CHAPTER.3
  9.  
  10. This example opens /PROFILE/CHAPTER.3,
  11. and prepares to print at the end of the
  12. file.
  13.  
  14. APPEND is like an OPEN, POSITION to the
  15. end, followed by a WRITE.
  16.  
  17. To APPEND a random-access text file,
  18. use [L#] to indicate the record length
  19.  
  20. The other options are used as usual.
  21.  
  22. BINARY OPTIONS (not a command)
  23.  
  24.   Used with BRUN, BLOAD, BSAVE
  25.  
  26. Each command transfers data between
  27. file and memory, according to options.
  28.  
  29. pn must indicate a binary file (BIN) if
  30. [,Ttype] isn't used.
  31.  
  32. [,A#] is the first memory address.  If
  33. omitted, the last value of [A#] is
  34. used.  If [E#] used, it is the end
  35. address; if [L#] is used, it is number
  36. of bytes moved.
  37.  
  38. [,B#] is the number of the first used
  39. byte in the file.  Default is 0.
  40.  
  41. The other options are used as usual.
  42.  
  43. BLOAD        (Imm & Def)
  44.  
  45.       Read binary data from a file
  46.  
  47. Form: BLOAD pn [,A#] [,B#] [,L#|,E#]
  48.              [,Ttype] [,S#] [,D#]
  49.  
  50. Example: BLOAD /PIX/ICE,A8192,E16383
  51.          BLOAD /PIX/ICE,A8192,L8192
  52.  
  53. Both examples move a binary picture
  54. from /PIX/ICE (type BIN) to graphics
  55. screen 1. A8192 is the start address of
  56. the graphics screen.  In the first case
  57. E16383 is the end address, in the
  58. second, L8192 is the length of the move
  59. in bytes.
  60.  
  61. See HELP BINARY for the options.
  62.  
  63.  
  64.  
  65. BRUN        (Imm & Def)
  66.  
  67.     Run a binary program from a file
  68.  
  69. Form: BRUN pn [,A#] [,B#] [,L#|,E#]
  70.            [,S#] [,D#]
  71.  
  72. Example: BRUN /VIDEO/LITESHOW
  73.  
  74. This command causes the binary program
  75. in the file /VIDEO/LITESHOW (type BIN)
  76. to be moved into memory and run.  It is
  77. placed in memory starting at the
  78. address from which it was last BSAVEd.
  79.  
  80. See HELP BINARY for an explanation of
  81. the options.
  82.  
  83.  
  84. BSAVE        (Imm & Def)
  85.  
  86.        Save binary data in a file
  87.  
  88. Form:  BSAVE pn ,A# ,L#|,E# [,B#]
  89.              [,Ttype] [,S#] [,D#]
  90.  
  91. Example: BSAVE /PIX/TOOTH,A8192,E16383
  92.          BSAVE /PIX/TOOTH,A8192,L8192
  93.  
  94. Both save graphics screen 1 to the file
  95. /PIX/TOOTH (type BIN). A8192 is the
  96. start address of the graphics page.  In
  97. the top example, E16383 is the end
  98. address; in the other, L8192 is the
  99. length of the move in bytes.
  100.  
  101. A#, L#, E# are optional after BSAVE if
  102. pn already exists.
  103.  
  104. See HELP BINARY.
  105.  
  106. CAT         (Imm & Def)
  107.  
  108.    Show a 40-column directory listing
  109.  
  110. Form:  CAT [pn] [,S#] [,D#]
  111.  
  112. Example:  CAT /BUDGET/JAN
  113.           CAT, S6, D2
  114.  
  115. The first example lists the files in
  116. the directory /BUDGET/JAN; the second
  117. lists files in volume directory S6, D2.
  118.  
  119. If no options are used, the files in
  120. the prefix directory are listed.
  121.  
  122. [pn] must indicate a directory; without
  123. [pn], files in drive [,S#] [,D#] are
  124. displayed.
  125.  
  126. CAT shows filename, type, size, and
  127. modified date.
  128.  
  129. CATALOG       (Imm & Def)
  130.  
  131.   Show an 80-column directory listing
  132.  
  133. Form:  CATALOG  [pn] [,S#] [,D#]
  134.  
  135. Example:  CATALOG /BUDGET/JAN
  136.           CATALOG, S6, D2
  137.  
  138. The first example lists the files in
  139. the directory /BUDGET/JAN; the second
  140. lists files in volume directory S6, D2.
  141.  
  142. This command shows the same items as
  143. CAT.  In addition, it shows the date
  144. the file was created, the logical
  145. length of the file, and some subtype
  146. information.
  147.  
  148. See HELP CAT.
  149.  
  150. CHAIN        (Imm & Def)
  151.  
  152. Run a BASIC program, save the variables
  153.  
  154. Form:  CHAIN pn [,@#] [,S#] [,D#]
  155.  
  156. Example: CHAIN /SECURITY/ALARM.2 ,@500
  157.  
  158. This example runs the program in
  159. /SECURITY/ALARM.2 starting at line 500,
  160. preserving any variables used by an
  161. earlier part of the program.
  162.  
  163. pn indicates a file of type BAS.
  164.  
  165. [,@#] indicates the line of the program
  166. at which execution is to start.
  167.  
  168. The other options are used as usual.
  169.  
  170. CLOSE        (Imm & Def)
  171.  
  172.   Prevent further I/O to a file
  173.  
  174. Form: CLOSE [pn]
  175.  
  176. Example: CLOSE /THE/DOOR
  177.  
  178. This example causes the file DOOR on
  179. the volume THE to be closed.
  180.  
  181. pn indicates the file to be closed.  If
  182. you omit pn, all open files are closed.
  183.  
  184. The CLOSE command does a flush, then it
  185. removes all information about the file
  186. from memory (but not from the disk).
  187.  
  188. This command MUST be used on all open
  189. files.
  190.  
  191. CREATE       (Imm & Def)
  192.  
  193.  Create a new directory or file
  194.  
  195. Form: CREATE pn [,Ttype] [,S#] [,D#]
  196.  
  197. Example: CREATE /BIG/WIG
  198.  
  199. This example creates a directory file
  200. (type DIR) with the path /BIG/WIG .
  201.  
  202. pn is the pathname or partial pathname
  203. of the file to be created.
  204.  
  205. type is a 3-letter abbreviation that
  206. determines the created file's type.
  207. Abbreviations for the file types are
  208. listed in HELP FILE .
  209.  
  210. The other options are used as usual.
  211.  
  212. DASH (-)      (Imm & Def)
  213.  
  214.   Run a BASIC, binary, or EXEC program,
  215.   or run another system program
  216.  
  217. Form:  - pn [,S#] [,D#]
  218.  
  219. Example: - ANY.PROGRAM
  220.  
  221. This example runs the program in the
  222. file ANY.PROGRAM stored in the prefix
  223. directory.
  224.  
  225. The program in the file indicated by pn
  226. can be any type of program file.  It
  227. can be a BASIC program (BAS), a binary
  228. program (BIN), an EXEC program (TXT),
  229. or a system program (SYS).
  230.  
  231. The other options are used as usual.
  232.  
  233. DELETE       (Imm & Def)
  234.  
  235.     Remove a file from its directory
  236.  
  237. Form: DELETE pn [,S#] [,D#]
  238.  
  239. Example:  PREFIX /LETTERS/GRANDMA
  240.           DELETE OLD.FILE
  241.  
  242. This example removes the file OLD.FILE
  243. from the directory /LETTERS/GRANDMA.
  244. A deleted file cannot be recovered.
  245.  
  246. pn is the pathname or partial pathname
  247. of the file to be removed.  The file
  248. must be unlocked.  If it is a directory
  249. file, it must be empty.
  250.  
  251. The other options are used as usual.
  252.  
  253. EXEC         (Imm & Def)
  254.  
  255.     Read commands from a text file
  256.  
  257. Form: EXEC pn [,F#] [,S#] [,D#]
  258.  
  259. Example: EXEC /DISK2/MENU
  260.  
  261. This example causes the sequential text
  262. file /DISK2/MENU to be used as the
  263. source of commands for BASIC rather
  264. than the keyboard.
  265.  
  266. pn must indicate a text file, type TXT.
  267.  
  268. [F#] is the number of fields that
  269. should be read and discarded before
  270. execution of the file begins.
  271.  
  272. The other options are used as usual.
  273.  
  274. FILE TYPES (not a command)
  275.  
  276.  These are the file type abbreviations
  277.  used by the commands
  278.  
  279.  CREATE, BSAVE, BLOAD, OPEN, APPEND
  280.  
  281.      ABBR   FILE TYPE
  282.  
  283.       DIR   Directory
  284.       TXT   Text
  285.       BAS   Applesoft Program
  286.       VAR   Applesoft Variables
  287.       BIN   Binary
  288.       REL   Relocatable Code
  289.    *  $F#   User Defined
  290.       SYS   ProDOS System File
  291.       SYS   ProDOS System Program
  292.  
  293.  
  294.    *  # is an integer from 1 to 8
  295.  
  296. FLUSH        (Imm & Def)
  297.  
  298.    Empty the buffers of an open file
  299.  
  300. Form: FLUSH [pn]
  301.  
  302. Example: FLUSH
  303.  
  304. This example causes all open files to
  305. be flushed (except EXEC files).
  306.  
  307. [pn] indicates the file to be flushed.
  308. It must be open for FLUSH to have any
  309. effect.  If [pn] is omitted, all open
  310. files are flushed.
  311.  
  312. After a file is flushed, you can be
  313. sure that every character printed to
  314. the file is stored on the disk.
  315.  
  316.  
  317.  
  318. HELP (a user-added command)
  319.  
  320. To use, type:   HELP XXX  (XXX's below)
  321.  
  322. Explanatory:    HELP, SYNTAX, BINARY,
  323.                 FILE
  324.  
  325. Using Files:    CAT, CATALOG, PREFIX,
  326.                 CREATE, RENAME, DELETE,
  327.                 LOCK, UNLOCK
  328.  
  329. BASIC in Files: - , LOAD, RUN, SAVE
  330.  
  331. Programming:    CHAIN, STORE, RESTORE,
  332.                 PR#, IN#
  333.  
  334. Text in Files:  OPEN, CLOSE, WRITE,
  335.                 READ, APPEND, POSITION,
  336.                 FLUSH, EXEC
  337.  
  338. Binary Files:   BLOAD, BRUN, BSAVE
  339.  
  340. IN#         (Imm & Def)
  341.  
  342.    Get input from a slot or a program
  343.  
  344. Form: IN# snum|A#
  345.  
  346. Examples: IN#3
  347.           IN# A$300
  348.  
  349. The first example causes subsequent
  350. characters to be taken from the device
  351. in slot 3; the second causes the
  352. routine at $300 to be used for input.
  353.  
  354. Use either snum or A#, not both. snum
  355. is the slot for subsequent input, A#
  356. is the address of an input program
  357. whose first byte is a 6502 CLD
  358. instruction.
  359.  
  360. LOAD        (Imm & Def)
  361.  
  362.     Get a BASIC program from a file
  363.  
  364. Form:  LOAD pn [,S#] [,D#]
  365.  
  366. Example:  LOAD /PROGRAMS/QUESTIONS
  367.  
  368. This example brings the BASIC program
  369. /PROGRAMS/QUESTIONS into memory.
  370. Loading a program is just like typing
  371. NEW and then typing in the program.
  372.  
  373. The file indicated by pn must contain a
  374. BASIC program (type BAS).
  375.  
  376. The other options are used as usual.
  377.  
  378. LOCK        (Imm & Def)
  379.  
  380.    Protect a file from being renamed,
  381.    written to or destroyed.
  382.  
  383. Form:  LOCK pn [,S#] [,D#]
  384.  
  385. Example:  LOCK /NESS/MONSTER ,S6 ,D2
  386.  
  387. This example locks the file MONSTER on
  388. the disk named /NESS which should be in
  389. slot 6, drive 2 (but needn't be).
  390.  
  391. pn is a pathname or partial pathname.
  392. You cannot LOCK a volume directory file
  393. (write protect the disk instead).
  394.  
  395. The other options are used as usual.
  396.  
  397.  
  398.  
  399.  
  400.  
  401. - (DASH)      (Imm & Def)
  402.  
  403.   Run a BASIC, binary, or EXEC program,
  404.   or run another system program
  405.  
  406. Form:  - pn [,S#] [,D#]
  407.  
  408. Example: - ANY.PROGRAM
  409.  
  410. This example runs the program in the
  411. file ANY.PROGRAM stored in the prefix
  412. directory.
  413.  
  414. The program in the file indicated by pn
  415. can be any type of program file.  It
  416. can be a BASIC program (BAS), a binary
  417. program (BIN), an EXEC program (TXT),
  418. or a system program (SYS).
  419.  
  420. The other options are used as usual.
  421.  
  422. OPEN       (Deferred)
  423.  
  424.    Open a file for reading or writing
  425.  
  426. Form: OPEN pn [,Ttype] [,L#] [,S#]
  427.            [,D#]
  428.  
  429. Examples: OPEN /LETTERS/ACCEPTANCE
  430.           OPEN /LIBRARY/BOOK,L100
  431.  
  432. The first opens a sequential text file;
  433. the second opens a random-access text
  434. file whose records are 100 bytes long.
  435.  
  436. pn indicates a text file (type TXT)
  437. unless [,Ttype] is used.
  438.  
  439. A file's record length is set by [,L#]
  440. the first time the file is opened.
  441.  
  442. The other options are used as usual.
  443.  
  444.  
  445. POSITION     (Deferred)
  446.  
  447.   Read and discard a number of fields
  448.  
  449. Form: POSITION pn ,F#|,R#
  450.  
  451. Example: POSITION WORDLIST,F15
  452.  
  453. This example causes 15 fields to be
  454. read and discarded starting at the
  455. current file position of WORDLIST in
  456. the prefix directory.
  457.  
  458. pn must indicate an open text file.
  459.  
  460. F# and R# have identical meanings. Each
  461. causes # fields to be read and
  462. discarded from pn.
  463.  
  464.  
  465.  
  466.  
  467.  
  468. PR#         (Imm & Def)
  469.  
  470.    Send output to a slot or a program
  471.  
  472. Form: PR# snum|A#|snum,A#
  473.  
  474. Examples: PR#1
  475.           PR# A$300
  476.           PR#1,A$C300
  477.  
  478. The first example causes subsequent
  479. characters to be sent to the device in
  480. slot 1; the second causes the routine
  481. at $300 to be used for output; the
  482. third assigns slot 1 to slot 3.
  483.  
  484. snum indicates the output slot; A# is
  485. the address of an output program whose
  486. first byte is a 6502 CLD instruction.
  487.  
  488. If both snum and A# are used, snum is
  489. assigned a new I/O routine.
  490. PREFIX       (Imm & Def)
  491.  
  492. Assign or view current Prefix
  493.   Pathname = PREFIX + Partial Pathname
  494.  
  495. Form: PREFIX [pn] [,S#] [,D#]
  496.  
  497. Examples: PREFIX     (Gets Prefix)
  498.           PREFIX /EXAMPLES/PRACTICE
  499.  
  500. From Immediate mode, No options:
  501.  Prefix displayed on screen.
  502. From program, no options:
  503.  Next INPUT assigns Prefix to variable
  504.  
  505. pn must indicate a directory file.
  506.  
  507. If pn is "/", Prefix is empty, else
  508. Prefix is set to pn.
  509.  
  510. [,S#] [,D#] without pn: Prefix set to
  511. the volume name of [,S#] [,D#]
  512. READ       (Deferred)
  513.  
  514.     Prepare an open file to be read
  515.  
  516. Form: READ pn [,R#] [,F#] [,B#]
  517.  
  518. Examples: READ MIND
  519.           READ /OUT/LOUD,R25
  520.  
  521. The top example prepares MIND from the
  522. the prefix directory for reading. The
  523. other prepares record 25 of /OUT/LOUD
  524. to be read.
  525.  
  526. After READ, INPUT and GET get data from
  527. pn until the next ProDOS command is
  528. issued.
  529.  
  530. With random-access files, [R#] is the
  531. record to be read.  [F#] and [B#] are
  532. the number of fields and bytes to skip
  533. before starting to read.
  534.  
  535. RENAME       (Imm & Def)
  536.  
  537.           Change a file's name
  538.  
  539. Form: RENAME pn1,pn2 [,S#] [,D#]
  540.  
  541. Example: PREFIX /MYDISK
  542.          RENAME OLD.NAME,NEW.NAME
  543.  
  544. This example gives /MYDISK/OLD.NAME
  545. the new name /MYDISK/NEW.NAME
  546.  
  547. pn1 is the file's old pathname; it must
  548. exist, and it must be unlocked.
  549.  
  550. pn2 is the file's new pathname; it
  551. must not exist.
  552.  
  553. pn1 and pn2 must be in same directory.
  554.  
  555. The other options are used as usual.
  556.  
  557. RESTORE       (Imm & Def)
  558.  
  559.        Get variables from a file
  560.  
  561. Form:  RESTORE pn [,S#] [,D#]
  562.  
  563. Example:  RESTORE /GAMES/HIPPO.VARS
  564.  
  565. This example reads the variables from
  566. the file /GAMES/HIPPO.VARS and uses
  567. them for the program currently in
  568. memory.
  569.  
  570. When you restore variables, ProDOS
  571. first removes all BASIC variables that
  572. were previously in memory.
  573.  
  574. pn must indicate a file of type VAR.
  575.  
  576. The other options are used as usual.
  577.  
  578. RUN         (Imm & Def)
  579.  
  580.      Run a BASIC program from a file
  581.  
  582. Form: RUN pn [,@#] [,S#] [,D#]
  583.  
  584. Example: RUN BINGO ,@100
  585.  
  586. This example loads the file BINGO from
  587. the prefix directory, and then runs it
  588. beginning at line 100.
  589.  
  590. pn must indicate a file of type BAS.
  591.  
  592. Without the [,@#] option, ProDOS starts
  593. running the program at its first line.
  594. With this option, ProDOS starts running
  595. the program at line #.
  596.  
  597. The other options are used as usual.
  598.  
  599. SAVE        (Imm & Def)
  600.  
  601.      Save a BASIC program to a file
  602.  
  603. Form:  SAVE pn [,S#] [,D#]
  604.  
  605. Example:  SAVE /CUSHION/WHOOPEE
  606.  
  607. This example stores the BASIC program
  608. in memory into the BASIC program file
  609. (type BAS) /CUSHION/WHOOPEE on a disk.
  610.  
  611. pn is the pathname or partial pathname
  612. of the file in which the program is
  613. to be saved.  If pn already exists, it
  614. must be unlocked, and it must be type
  615. BAS.
  616.  
  617. The other options are used as usual.
  618.  
  619.  
  620.  
  621. STORE        (Imm & Def)
  622.  
  623.      Save all variables into a file
  624.  
  625. Form:  STORE pn [,S#] [,D#]
  626.  
  627. Example: STORE /GAMES/HIPPO.VARS
  628.  
  629. This example places the names and
  630. values of all the BASIC variables that
  631. are currently defined into the file
  632. /GAMES/HIPPO.VARS, of type VAR.
  633.  
  634. The values of these variables can be
  635. brought into memory using the RESTORE
  636. command.
  637.  
  638. The other options are used as usual.
  639.  
  640. SYNTAX of ProDOS command options
  641.  
  642.  
  643. [,A#]  Address of 1st byte to transfer
  644. [,B#]  Bytes to skip
  645. [,D#]  Drive number (1-2)
  646. [,E#]  End address for transfer
  647. [,F#]  Fields to skip
  648. [,L#]  Length of record
  649. [,R#]  Record number in file
  650. [,S#]  Slot of disk drive (1-7)
  651. [,@#]  BASIC line number
  652.  
  653. pn   = Pathname, partial pathname
  654. snum = Slot number (0-7)
  655.  
  656. [,Ttype]  type = File type abbrev.
  657.  
  658. See: HELP FILE for file types;
  659.      HELP BINARY for A#, B#, E#, L#
  660.  
  661. UNLOCK        (Imm & Def)
  662.  
  663. Remove protection from a LOCKed file
  664.  
  665. Form: UNLOCK pn [,S#] [,D#]
  666.  
  667. Example: UNLOCK /IMPORTANT/INFO
  668.  
  669. This example unlocks the file INFO on
  670. the disk named /IMPORTANT.
  671.  
  672. When a file is unlocked, it can be
  673. written to by a program, renamed or
  674. deleted.
  675.  
  676. The other options are used as usual.
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683. WRITE       (Deferred)
  684.  
  685.    Prepare an open file to be written
  686.  
  687. Form: WRITE pn [,R#] [,F#] [,B#]
  688.  
  689. Examples: WRITE SOON
  690.           WRITE /LY/SO,R26
  691.  
  692. The top example prepares SOON from the
  693. prefix directory to be written.  The
  694. other prepares record 26 of /LY/SO to
  695. be written.
  696.  
  697. After WRITE, PRINT sends characters to
  698. pn until a ProDOS command is issued.
  699.  
  700. With random-access text files, [R#] is
  701. the record to be written.  [F#] and
  702. [B#] are the number of fields and
  703. bytes to skip before writing.
  704.  
  705.